<?php $this->load->module('mobile/index/header', $common); ?>
    <div class="wrap">
    <div class="container">
        <div class="jdxqbar">
            <img class="imgbg" src="<?php echo filter_img($row['gallery'][0]['url']); ?>" data-original="<?php echo filter_img($row['gallery'][0]['url']); ?>">
            <div class="jdxqbartag">
                <p> <?php echo $row['short_name']; ?></p>
                <span><?php echo $row['line_name']; ?></span>
            </div>
        </div>
        <div class="jdxqtitle">
            <div class="jdxqtitle1 cl">
            <div class="jdxqtitle-left">
                <p> <?php echo $row['line_name']; ?></p>
                <span><?php echo $row['sort_name']; ?></span>
            </div>
            <div class="jdxqtitle-right">
                <div class="zxsc">
                    <a href="<?php echo site_url('mobile/line/order_tel?id='. $row['line_id']) ?>">
                        <img class="img1" src="img/zx.png" data-original="img/zx.png"></a>
                    <a><img class="img2" id="js-add-favourite" src="img/sc.png" data-original="img/sc.png"></a>
                    <!--
                    <a class="color1" href="<?php echo site_url('mobile/line/order_tel?id='. $row['line_id']) ?>">
                        <i class="consult">咨询</i></a>
                    <a class="color2"><i class="collection" id="js-add-favourite">收藏</i></a>
                    -->
                </div>
                <div class="llrs">
                    <span>已有<i><?php echo $row['visits']; ?></i>人浏览 </span>
                </div>
            </div>
            </div>
        </div>
        <div class="jdxqprice">
            <div class="price">
                <div><small>促销价：</small> <?php echo $row['low_price'] ? '<strong>￥' . $row['low_price'] . '</strong><small>起</small>' : '<strong>暂无价格</strong>'; ?></div>
<?php if(ADMINID && $fee){?><div> <small>佣金：</small><strong><?php echo $fee?></strong>   </div><?php }?>
            </div>
            <div class="ljydbtn">
                <a id="prixce">展开</a>
                <?php if($row['low_price']){?>
                    <a href="<?php echo site_url('mobile/line/order?id=' . $row['line_id'] . '&referer=' . urlencode($_SERVER['REQUEST_URI'])) ?>">
                        <span class="paybtn">立即预定</span>
                    </a>
                    <?php }else{?>
                    <a href="tel:<?php echo $site_service_phone?>"><span class="paybtn">电询</span> </a>
                <?php }?>
            </div>
            <style>
                #prixce{color:#666666;}
                .contentp{display:none;clear: both;padding-top:10px}
                .table1 {border-collapse: collapse; width:98%!important;margin:0 1%}
                .table1 td{border:1px solid #6fafda!important;font-size:12px;color:#666666;
                    padding:2px 5px;}
                .table1 td *{font-size: 12px!important;}
            </style>
            <div class="contentp">
                <table class="table1">
                    <?php foreach ($go as $k => $v) { ?>
                        <tr>
                            <td><?php echo $v['go_date'] .'&nbsp;'. $v['week'] ?></td>
                            <td style="color: #dd551a;"><?php echo $v['price']; ?></td>
                        </tr>
                    <?php } ?>
                </table>
            </div>
            <script>
                var shouqi =1;
                $('#prixce').click(function () {
                    if(shouqi){
                        $(this).html('收起');
                    }else{
                        $(this).html('展开');
                    }
                    shouqi = !shouqi;
                    $('.contentp').toggle('fast');
                });
            </script>
        </div>
        <div class="container">
            <div class="jdxqbioati">
                <img src="img/xc.png" data-original="img/xc.png">
                <span>景区行程介绍</span>
            </div>
            <div class="jqxc">
                <h1>产品特色</h1>
                <p><?php echo nl2br(trim($info['line_trait'])) ?></p>
                <?php if(!$days){ echo '<style type="text/css">.simple img{width:100%}
.simple table {border-collapse: collapse;
    width: 100%!important;}
.simple table td{border:1px solid #6fafda!important;font-size:12px;
    padding: 0 2px;}
.simple table td *{font-size: 12px!important;}
</style><div class="simple">'.preg_replace('/(width\="\d+"|style\=".*?")/i', '', $info['simple_line_day']) .'</div>'; }?>
                <?php if($days){?><h1>沿途景点</h1><?php }?>
                <?php foreach ($days as $k => $v): ?>
                    <p><span><a href="javascript:;">第&nbsp;<?php echo $k + 1; ?>&nbsp;天</a>&nbsp;&nbsp;</span>
                        <?php echo str_replace(array("【飞机】","【轮船】","【火车】","【汽车】"),array('&nbsp;<img src="img/flyto.png" style="display: inline;">&nbsp;','&nbsp;<img src="img/boat.png" style="display: inline;">&nbsp;','&nbsp;<img src="img/train.png" style="display: inline;">&nbsp;','&nbsp;<img src="img/bus.png" style="display: inline;">&nbsp;'),$v['title']);?>

                    </p>
                <?php endforeach; ?>
                <div class="jqxc-day">
                <?php foreach ($days as $k => $v): ?>
                    <div class="fday" id="day1">
                            <p><span>第<?php echo $k + 1; ?>天&nbsp;&nbsp;</span>
                                <?php echo str_replace(array("【飞机】","【轮船】","【火车】","【汽车】"),array('&nbsp;<img src="img/flyto.png" style="display: inline;">&nbsp;','&nbsp;<img src="img/boat.png" style="display: inline;">&nbsp;','&nbsp;<img src="img/train.png" style="display: inline;">&nbsp;','&nbsp;<img src="img/bus.png" style="display: inline;">&nbsp;'),$v['title']);?>
                            </p>
                        </div>
                        <div class="xcms ">
                            <p><span>行程描述&nbsp;&nbsp;</span></p>
                            <div class="txt bottom-unline">
                                <span><?php echo $v['info']; ?> </span>
                                <div class="photo-list-wrap">
                                <?php foreach ($v['scenics_list'] as $vs): ?><?php foreach ($vs['gallery'] as $vg): ?>
                                    <div class="photo">
                                        <img alt="<?php echo $v['name'] ?>" class="lazy" onerror="this.error=null;this.src='<?php echo URLPRE; ?>static/public/images/nophoto.jpg'" src="<?php echo filter_img($vg['url']) ?>" style="display: inline-block;">
                                           <p><?php echo $vg['name']; ?></p>
                                        </div>
                                <?php endforeach; ?><?php endforeach; ?>
                               </div>
                            </div>
                             <p><span>三餐&nbsp;&nbsp;</span></p>
                            <div class="txt bottom-unline">
                                  <span>
                                    早餐：<?php echo $v['breakfast']; ?>
                                &nbsp;午餐：<?php echo $v['lunch']; ?> &nbsp;晚餐：<?php echo $v['supper']; ?>
                                  </span>
                            </div>
                             <p><span>住宿&nbsp;&nbsp;</span></p>
                            <div class="txt">
                                <span><?php echo $v['hotel']; ?></span>
                            </div>
                              <div class="lineblue"></div>
                        </div>
                            <?php endforeach; ?>
                </div>

            </div>
            </div>
            <div class="linegrey"> </div>
            <div class="jdxqbioati">
                <img src="img/wxts.png" data-original="img/wxts.png">
                <span>温馨提示</span>
            </div>
            <div class="jqxc">
                <p>&nbsp;</p>
                <?php if ($info['costin']): ?>
                    <p><span>【费用包含】</span> <?php echo strip_tags($info['costin'],'</br>'); ?> </p>
                <?php endif; ?>
                <?php if ($info['costout']): ?>
                    <p><span>【费用不包含】</span> <?php echo strip_tags($info['costout'],'</br>'); ?> </p>
                <?php endif; ?>
                <?php if ($info['remind']): ?>
                    <p><span>【友情提醒】</span> <?php echo strip_tags($info['remind'],'</br>'); ?> </p>
                <?php endif; ?>
                <?php if ($info['enroll_know']): ?>
                    <p><span>【参团须知】</span> <?php echo strip_tags($info['enroll_know'],'</br>'); ?> </p>
                <?php endif; ?>
                <?php if ($info['ddzx']): ?>
                    <p><span>【当地咨询】</span> <?php echo strip_tags($info['ddzx'],'</br>'); ?> </p>
                <?php endif; ?>
                <?php if ($info['aqwt']): ?>
                    <p><span>【安全问题】</span> <?php echo strip_tags($info['aqwt'],'</br>'); ?> </p>
                <?php endif; ?>
                <?php if ($info['cydh']): ?>
                    <p><span>【常用电话】</span> <?php echo strip_tags($info['cydh'],'</br>'); ?> </p>
                <?php endif; ?>
                <?php if ($info['xqzb']): ?>
                    <p><span>【行前准备】</span> <?php echo strip_tags($info['xqzb'],'</br>'); ?> </p>
                <?php endif; ?>
                <?php if ($info['zftj']): ?>
                    <p><span>【自费推荐】</span> <?php echo strip_tags($info['zftj'],'</br>'); ?> </p>
                <?php endif; ?>
                <?php if ($info['upgrade']): ?>
                    <p><span>【产品升级】</span> <?php echo strip_tags($info['upgrade'],'</br>'); ?> </p>
                <?php endif; ?>
            </div>
            <div class="linegrey"> </div>
            <div class="jdxqbioatimore">
                <img src="img/xgxl.png" data-original="img/xgxl.png">
                <span>相关线路</span>
<!--                <a><img src="img/moregrey.png" data-original="img/moregrey.png" style="float: right;width: 4%;"></a>-->
            </div>

            <ul class="connlines cl">
             <?php if($conn_lines):
                 $conn_lines = array_values($conn_lines);
             $val = $conn_lines[0];
             $val2 = $conn_lines[1];
             ?>

                 <ul>
                     <li>
                         <div style="clear: both">
                             <div class="fl-left">
                         <a class="cl" href="<?php echo $val['detail_url'];?>">
                                 <div class="f1-left1">
                                     <img class="f1-left1-img" src="<?php echo URLPIC.$val['line_thumb'];?>" data-original="<?php echo URLPIC.$val['line_thumb'];?>" style="display: inline;">
                                     <ul>
                                         <li><h1><?php echo $val['line_name'];?></h1></li>
                                         <li class="other"><strong><?php echo $val['sort_name'];?></strong></li>
                                          <li class="price-box">
                                             <span class="price"><?php echo $val['low_price']?'￥'.$val['low_price']:'电询';?></span>
                                              <?php if(!$GLOBALS['config']['mobileorderdisable']){?>
                                              <?php if(!ADMINID){?>
                                             <span class="book-button book-button-red" >订购</span>
                                              <?php }?>
                                              <?php }?>
                                          </li>
                                     </ul>
                                 </div>
                         </a>
                             </div>
                             <?php if($val2['detail_url']){?>
                             <div class="fl-right">
                         <a class="cl" href="<?php echo $val2['detail_url'];?>">
                                 <div class="f1-right1">
                                     <img class="f1-right1-img" src="<?php echo URLPIC.$val2['line_thumb'];?>" data-original="<?php echo URLPIC.$val2['line_thumb'];?>" style="display: inline;">
                                     <ul>
                                         <li><h1><?php echo $val2['line_name'];?></h1></li>
                                         <li class="other"><strong><?php echo $val2['sort_name'];?></strong></li>
                                         <li class="price-box">
                                             <span class="price"><?php echo $val2['low_price']?'￥'.$val2['low_price']:'电询';?></span>
                                             <?php if(!$GLOBALS['config']['mobileorderdisable']){?>
                                             <span class="book-button book-button-red" >订购</span>
                                             <?php }?>
                                          </li>
                                     </ul>
                                 </div>
                         </a>
                             </div><?php }?>
                         </div>
                     </li>
                 </ul>
             <?php endif;?>
            </ul>
         </div>
    </div>
<style>
    .connlines>li {
        width:48%;
        float:right;
        border:1px solid #999;
    }
    .connlines>li:nth-of-type(1){
        margin-left:3%;
    }
    .connlines .fft{
        border:0!important;
        width:100%!important;
        margin:0!important;
    }

</style>

<script type="text/javascript">
    $(function(){

        var url = '<?php echo site_url('mobile/member/add_favourite');?>';
         var id = '<?php echo $row['line_id']; ?>';
         var title = '<?php echo $row['line_name']; ?>';
        $('#js-add-favourite').click(function(){

            if(!(ADMINID||USERID)){
                $.dialog({
                    style:'tip',
                    width:200,
                    closeTime:1000,
                    content: '<p style="text-align: center">您还没有登录,不能收藏</p>'
                }).open();
                return false;
            }

            $.get(url+(url.indexOf("?") > -1 ? "&" : "?")+'type=1&id='+id+'&title='+title, function(data){

                if(data.status.length>0){
                    $.dialog({
                        style:'tip',
                        width:200,
                        closeTime:1000,
                        content: '<p style="text-align: center">'+data.msg+'</p>'
                    }).open();
                }

            },'json');
        });

    })

</script>
<style>
    /**返回顶部 start**/
    .sidebar-wrap{position:fixed;right:4%;bottom:19%;width:50px;height:50px;
       text-align:center;display:none;}
</style>
<div class="sidebar-wrap">
        <a href="javascript:;" id="js-head-top"><img src="img/htop.png" width="50"></a>
</div>
    <script>
     /*$(function(){
         $(window).scroll(function(){
             var scroll_length = $(document).scrollTop();
             if(scroll_length<$(window).height()/2){
                 $('.sidebar-wrap').hide();
             }else{
                 $('.sidebar-wrap').show();
             }
         })

         $('#js-head-top').click(function(){

             $('html,body').animate({scrollTop: 0}, 500);
         })
     })*/

</script>
<?php echo $linesharehtml?>
<?php $this->load->module('mobile/index/footer', $common); ?>